package com.bzframework.pro.io.configuration;

import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author bingzhong
 * @Date 2024/12/6 13:46
 * @Description
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "file.manager.local")
public class LocalFileProperties {

    private boolean enabled;

    @Value("${server.port}")
    private String port;
    /**
     * like http://127.0.0.1:8080/file/{fileId}.xxx
     */
    private String baseUrl = "http://127.0.0.1:" + port;

    private String baseStoragePath = "./data/files";

    /**
     * 是否使用原始文件名进行存储
     */
    private boolean useOriginalFileName = false;

    private Set<String> denyFiles = new HashSet<>();

}
